<?php

function convertClass($controller_name) {
    $len = strlen($controller_name);
    $result = '';
    for ($i = 0; $i < $len; $i++) {
        while ($i < $len && ($controller_name[$i] == '-' || $controller_name[$i] == ' ' || $controller_name[$i] == '_')) {
            $i++;
        }

        if ($i < $len) {
            $result.= strtoupper($controller_name[$i]);
            $i++;
            while ($i < $len && $controller_name[$i] != "-" && $controller_name[$i] != ' ' && $controller_name[$i] != "_") {
                $result.= $controller_name[$i];
                $i++;
            }
            $i--;
        }
    }
    return $result;
}